{%extends "base.html"%}

{%block page_title%}ZOMBI Tools - Infiltration form{%endblock%}

{%block main%}
<br/>
<br/>
<br/>
<form method="POST" name"infiltration" class="login">

{%if error%}
An error occured : {{error}}<br/><br/>
{%endif%}

<h3>Location criteria :</h3>
<table>
<tr>
	<th>X min</th>
	<td>{{form.x_min}}&nbsp;&nbsp;</td>
	<th>Y min</th>
	<td>{{form.y_min}}&nbsp;&nbsp;</td>
	<th>X max</th>
	<td>{{form.x_max}}&nbsp;&nbsp;</td>
	<th>Y max</th>
	<td>{{form.y_max}}&nbsp;&nbsp;</td>
</tr>
<tr>
	<th>Or X</th>
	<td>{{form.x}}</td>
	<th>Y</th>
	<td>{{form.y}}</td>
	<th>distance : </th>
	<td>{{form.distance}}</td>

</tr>
</table><br/>
<h3>Planet criteria :</h3>
<table>
<tr><th>{{form.agro}}&nbsp;Agro&nbsp;</th><th>{{form.minero}}&nbsp;Minero&nbsp;</th><th>{{form.techno}}&nbsp;Techno</th></tr>
<tr><th>{{form.hyp}}&nbsp;Hyp.&nbsp;</th><th>{{form.dict}}&nbsp;Dict.&nbsp;</th><th>{{form.demo}}&nbsp;Demo.</th><th>{{form.auth}}&nbsp;Auth.</th></tr>
</table>
<br/>
<h3>Output Type :</h3>
{{form.output}}
<input type="submit" value="Search" />
</form>
{%if planets%}
<table>
<tr><th width="150px" align="left">Planet</th><th width="100px" align="left">Coords</th><th width="100px" align="left">Prod. type</th><th width="100px" align="left">Tag</th><th align="left" width="100px">Gouv</th></tr>
{%for pl in planets%}
<tr><td>{{pl.name}}</td><td>({{pl.x}}, {{pl.y}})</td><td>{{pl.get_prod_type}}</td><td>[{{pl.ally.alliance_tag}}]</td><td>{{pl.get_gouv_system}}</td>

<!-- <td>
	<form method="POST" target="blank" class="login" action="http://www.hyperiums.com/servlet/Planetprod">
	<input type="submit" value="Trade" name="newtrade"/>
	<input type="hidden" value="1" name="maxcapacity"/>
	<input type="hidden" value="0" name="transtype"/>
	<input type="hidden" value="{{source.hyperiums_id}}" name="planetid"/>
	<input type="hidden" value="{{pl.hyperiums_id}}" name="otherplanetid"/>
	<input type="hidden" value="0" name="tradeid"/>
	<input type="hidden" value="{{pl.name}}" name="otherplanetname"/>
	<input type="hidden" value="" name="setup"/>
	<input type="hidden" value="" name="comment"/>
	</form>
</td>

<td>
	<form method="POST" target="blank" class="login" action="http://www.hyperiums.com/servlet/Planetinf">
	<input type="submit" value="Infiltr." name="newinfiltr" />
	<input type="hidden" value="10" name="securitylevel"/>
	<input type="hidden" value="{{source.hyperiums_id}}" name="planetid"/>
	<input type="hidden" value="{{pl.hyperiums_id}}" name="infplanetid"/>
	</form>
</td> -->


</tr>

{%endfor%}
</table>
{%endif%}
{%endblock%}